package test;

import java.io.FileWriter;

public class FileWriterTest {

	public static void main(String[] args) {
		FileWriter writer=null;
		try {
			writer=new FileWriter("resources/work.txt");			
			writer.write("举头望明月，低头思故乡.");
			writer.flush();
			System.out.println("写入成功");
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}finally {
			try {
				writer.close();
			} catch (Exception e) {
				// TODO: handle exception
				e.printStackTrace();
			}
		}

	}

}
